home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Entertainment / MacMud / Mud 4.0 / mac.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-24  |  1.0 KB  |  49 lines  |  [TEXT/MPS ]

  1.  
  2. #ifndef __MMAC
  3. #define __MMAC
  4.  
  5. #include <quickdraw.h>
  6. #include <events.h>
  7. #include <memory.h>
  8. #include <files.h>
  9. #include <stdio.h>
  10. #include <fcntl.h>
  11. #include <errno.h>
  12.  
  13. #define  S_IFMT        0170000        /* type of file */
  14. #define  S_IFDIR    0040000        /* directory */
  15. #define  S_IFREG    0100000
  16. #define  S_IFLNK    0120000
  17.  
  18. // Let's just make a simple linked list for directory listings
  19. typedef struct DirList {
  20.     char            *name;
  21.     struct DirList    *next;
  22. } DirList;
  23.  
  24. struct stat {
  25.     unsigned short st_mode;
  26.     unsigned long st_size;
  27.     unsigned long st_mtime;
  28. };
  29.  
  30. char *crypt(char *pw, char *salt);
  31. int random(void);
  32. int macopen(const char *fname, int mode);
  33. FILE *macfopen(const char *fname, const char *mode);
  34. int macrename(const char *oldname, const char *newname);
  35. int macremove(const char *filename);
  36.  
  37. DirList *macgetdir(char *pathname);
  38. int maccountdir(DirList *dirlist);
  39. void macfreedir(DirList *dirlist);
  40.  
  41. void start_timer(short seconds);
  42. int timer_expired(void);
  43.  
  44. int mkdir(char *path, int mode);
  45. int rmdir(char *path);
  46.  
  47. int stat(char *fname, struct stat *buf);
  48.  
  49. #endif